import request, {formRequest}from '@/utils/request';
import { baseUrl } from '@/utils/settings';

export async function queryRole(param) {
    return request(baseUrl + 'role/selRoleAll',{ method:'post', data: param.payload}, param.type);
}

export async function selRoleAllNoPaging(param) {
    return request(baseUrl + 'role/selRoleAllNoPaging',{ method:'post', data: param.payload}, param.type);
}

export async function addRole(param) {
    return request(baseUrl + 'role/addRole',{ method:'post', data: param.payload}, param.type);
}

export async function setAuth(param) {
    return request(baseUrl + 'role/setAuth',{ method:'post', data: param.payload}, param.type);
}

export async function selRoleByName(param) {
    return request(baseUrl + 'role/selRoleByName',{ method:'post', data: param.payload}, param.type);
}

export async function delRole(param) {
    return request(baseUrl + 'role/delRole',{ method:'post', data: param.payload}, param.type);
}